package us.mooresr.webtroopmanager.client.events;

import us.mooresr.webtroopmanager.shared.UserSummary;

import com.google.gwt.event.shared.GwtEvent;

public class UserAddedEvent extends GwtEvent<UserAddedHandler> {
	public static Type<UserAddedHandler> TYPE = new Type<UserAddedHandler>();
	UserSummary user;
	
	

	public UserAddedEvent(UserSummary user) {
		super();
		this.user = user;
	}

	@Override
	protected void dispatch(UserAddedHandler handler) {
		handler.onAddUser(this);
		
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<UserAddedHandler> getAssociatedType() {
		return TYPE;
	}

	public UserSummary getUser() {
		return user;
	}

	
}
